let path = require('path');

let pathStr = 'G:/gitosc/node/nodejs/day04/path.js'

let basename = path.basename(pathStr);
let dirname = path.dirname(pathStr);

let apath = 'a/b'
let bpath = '/b/c'
console.log(path.join(apath, bpath));